package com.sg.service.biz.framework.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.base.framework.req.*;
import com.sg.dto.biz.framework.req.*;
import com.sg.dto.biz.framework.res.*;
import com.sg.dto.integration.component.QueryItemMatchResultToAnswerDetailComReqDto;
import com.sg.dto.integration.component.QueryItemMatchResultToAnswerDetailComRespDto;
import com.sg.service.base.framework.*;
import com.sg.service.biz.framework.PowerService;
import com.wicket.okrcomponent.integration.ConfSchemeService;
import com.sg.common.exception.Assert;
import com.wicket.okrframework.dal.po.mbg.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class OrgPositionServiceImpl
        implements com.wicket.okrframework.biz.service.OrgPositionService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    private MDeptPositionRelationshipService mDeptPositionRelationshipService;
    @Resource
    private MPositionService mPositionService;
    @Resource
    private MPositionGradeService mPositionGradeService;
    @Resource
    private MStationTypeService mStationTypeService;
    @Resource
    private MStationService mStationService;
    @Resource
    private MPostService mPostService;
    @Resource
    private MOrganizationService mOrganizationService;
    @Resource
    private MInductionRecordService mInductionRecordService;
    @Resource
    private MUserinfoService mUserinfoService;
    @Resource
    private NbOrgPosition nbOrgPosition;
    @Resource
    private ConfSchemeService confSchemeService;
    @Resource
    private PowerService powerService;

    /**
     * D1-3查询部门职务明细列表[1082]
     * gen by moon at 10/1/2022, 11:57:57 PM
     */
    @Trace(operationName = "D1-3查询部门职务明细列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptPositionInfoListRespDto queryDeptPositionInfoList(QueryDeptPositionInfoListReqDto reqDto) {


        List<DeptPositionRelationship> listDeptPositionRelationship_1 = new ArrayList<>();
        List<Position> listPosition_1 = new ArrayList<>();
        List<PositionGrade> listPositionGrade_1 = new ArrayList<>();
        List<StationType> listStationType_1 = new ArrayList<>();
        List<Station> listStation_1 = new ArrayList<>();
        List<Post> listPost_1 = new ArrayList<>();
//步骤0: 1-3-11查询组织部门职务列表 - queryOrgDeptPositionList
        List<DeptPositionRelationship> listDeptPositionRelationship = new ArrayList<>();
        QueryOrgDeptPositionListReq queryOrgDeptPositionListReq = new QueryOrgDeptPositionListReq();
        queryOrgDeptPositionListReq.setOrgTypeCode("DEPARTMENT");//sourceId:36501_1
        queryOrgDeptPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:36507_1
        queryOrgDeptPositionListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:49679_1
        if (reqDto != null) {
            queryOrgDeptPositionListReq.setOrgEntityId(reqDto.getOrgEntityId());//SimpleFieldAssign//sourceId:36502_1
        }

        /*1-3-11查询组织部门职务列表[193]   */
        Assert.isNull(queryOrgDeptPositionListReq.getOrgEntityId(), "D1-3查询部门职务明细列表-1-3-11查询组织部门职务列表-所属对象实例ID不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getSubjectLifeCycle(), "D1-3查询部门职务明细列表-1-3-11查询组织部门职务列表-主体生命周期不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getSpaceId(), "D1-3查询部门职务明细列表-1-3-11查询组织部门职务列表-创建于空间ID不能为空", false);
        listDeptPositionRelationship = mDeptPositionRelationshipService.queryOrgDeptPositionList(queryOrgDeptPositionListReq);


        listDeptPositionRelationship_1 = listDeptPositionRelationship;

//步骤1: 1-3-05批量查询职务列表 - batchQueryPositionList
        List<Position> listPosition = new ArrayList<>();
        if (listDeptPositionRelationship != null && listDeptPositionRelationship.size() > 0) {
            BatchQueryPositionListReq batchQueryPositionListReq = new BatchQueryPositionListReq();
            batchQueryPositionListReq.setPositionList(listDeptPositionRelationship.stream().map(item -> item.getPositionId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:36535_1
            batchQueryPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48861_1

            /*1-3-05批量查询职务列表[1460]   */
            Assert.isNull(batchQueryPositionListReq.getSubjectLifeCycle(), "D1-3查询部门职务明细列表-1-3-05批量查询职务列表-主体生命周期不能为空", false);
            listPosition = mPositionService.batchQueryPositionList(batchQueryPositionListReq);


            listPosition_1 = listPosition;
        }

//步骤2: 1-3-03批量查询职务级别列表 - batchQueryPositionGradeList
        List<PositionGrade> listPositionGrade = new ArrayList<>();
        if (listPosition != null && listPosition.size() > 0) {
            BatchQueryPositionGradeListReq batchQueryPositionGradeListReq = new BatchQueryPositionGradeListReq();
            batchQueryPositionGradeListReq.setOrgPositionGradeList(listPosition.stream().map(item -> item.getPositionGradeId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:39057_1

            /*1-3-03批量查询职务级别列表[1482]   */

            listPositionGrade = mPositionGradeService.batchQueryPositionGradeList(batchQueryPositionGradeListReq);


            listPositionGrade_1 = listPositionGrade;
        }

//步骤3: 1-3-04批量查询岗位类型 - batchQueryStationType
        List<StationType> listStationType = new ArrayList<>();
        if (listPositionGrade != null && listPositionGrade.size() > 0) {
            BatchQueryStationTypeReq batchQueryStationTypeReq = new BatchQueryStationTypeReq();
            batchQueryStationTypeReq.setOrgStationTypeList(listPositionGrade.stream().map(item -> item.getStationTypeId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48840_1

            /*1-3-04批量查询岗位类型[1651]   */

            listStationType = mStationTypeService.batchQueryStationType(batchQueryStationTypeReq);


            listStationType_1 = listStationType;
        }

//步骤4: 1-3-07批量查询岗位列表 - batchQueryStationList
        List<Station> listStation = new ArrayList<>();
        if (listPosition != null && listPosition.size() > 0) {
            BatchQueryStationListReq batchQueryStationListReq = new BatchQueryStationListReq();
            batchQueryStationListReq.setStationList(listPosition.stream().map(item -> item.getStationId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:36547_1

            /*1-3-07批量查询岗位列表[1466]   */

            listStation = mStationService.batchQueryStationList(batchQueryStationListReq);


            listStation_1 = listStation;
        }

//步骤5: 1-3-08批量查询职位列表 - batchQueryPostList
        List<Post> listPost = new ArrayList<>();
        if (listStation != null && listStation.size() > 0) {
            BatchQueryPostListReq batchQueryPostListReq = new BatchQueryPostListReq();
            batchQueryPostListReq.setPostList(listStation.stream().map(item -> item.getPostId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:36628_1

            /*1-3-08批量查询职位列表[1467]   */

            listPost = mPostService.batchQueryPostList(batchQueryPostListReq);


            listPost_1 = listPost;
        }

        QueryDeptPositionInfoListRespDto retData = new QueryDeptPositionInfoListRespDto();
        //sourceId:48862_1


        return retData;
    }

    /**
     * D1-3查询组织/部门岗位明细列表[1652]
     * gen by moon at 10/2/2022, 12:17:27 AM
     */
    @Trace(operationName = "D1-3查询组织/部门岗位明细列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptStationInfoListRespDto queryDeptStationInfoList(QueryDeptStationInfoListReqDto reqDto) {


        List<Station> listStation_1 = new ArrayList<>();
        List<Post> listPost_1 = new ArrayList<>();
        List<StationType> listStationType_1 = new ArrayList<>();
//步骤0: 1-3-11查询组织部门职务列表 - queryOrgDeptPositionList
        List<DeptPositionRelationship> listDeptPositionRelationship = new ArrayList<>();
        QueryOrgDeptPositionListReq queryOrgDeptPositionListReq = new QueryOrgDeptPositionListReq();
        queryOrgDeptPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48856_1
        queryOrgDeptPositionListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:49680_1
        if (reqDto != null) {
            queryOrgDeptPositionListReq.setOrgTypeCode(reqDto.getOrgTypeCode());//SimpleFieldAssign//sourceId:48852_1
            queryOrgDeptPositionListReq.setOrgEntityId(reqDto.getOrgEntityId());//SimpleFieldAssign//sourceId:48853_1
        }

        /*1-3-11查询组织部门职务列表[193]   */
        Assert.isNull(queryOrgDeptPositionListReq.getOrgTypeCode(), "D1-3查询组织/部门岗位明细列表-1-3-11查询组织部门职务列表-所属实例类型编码不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getOrgEntityId(), "D1-3查询组织/部门岗位明细列表-1-3-11查询组织部门职务列表-所属对象实例ID不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getSubjectLifeCycle(), "D1-3查询组织/部门岗位明细列表-1-3-11查询组织部门职务列表-主体生命周期不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getSpaceId(), "D1-3查询组织/部门岗位明细列表-1-3-11查询组织部门职务列表-创建于空间ID不能为空", false);
        listDeptPositionRelationship = mDeptPositionRelationshipService.queryOrgDeptPositionList(queryOrgDeptPositionListReq);


//步骤1: 1-3-05批量查询职务列表 - batchQueryPositionList
        List<Position> listPosition = new ArrayList<>();
        if (listDeptPositionRelationship != null && listDeptPositionRelationship.size() > 0) {
            BatchQueryPositionListReq batchQueryPositionListReq = new BatchQueryPositionListReq();
            batchQueryPositionListReq.setPositionList(listDeptPositionRelationship.stream().map(item -> item.getPositionId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48865_1
            batchQueryPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48870_1

            /*1-3-05批量查询职务列表[1460]   */
            Assert.isNull(batchQueryPositionListReq.getSubjectLifeCycle(), "D1-3查询组织/部门岗位明细列表-1-3-05批量查询职务列表-主体生命周期不能为空", false);
            listPosition = mPositionService.batchQueryPositionList(batchQueryPositionListReq);


        }

//步骤2: 1-3-07批量查询岗位列表 - batchQueryStationList
        List<Station> listStation = new ArrayList<>();
        if (listPosition != null && listPosition.size() > 0) {
            BatchQueryStationListReq batchQueryStationListReq = new BatchQueryStationListReq();
            batchQueryStationListReq.setStationList(listPosition.stream().map(item -> item.getStationId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48871_1
            batchQueryStationListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48872_1
            if (reqDto != null) {
                batchQueryStationListReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:54158_1
            }

            /*1-3-07批量查询岗位列表[1466]   */
            Assert.isNull(batchQueryStationListReq.getSubjectLifeCycle(), "D1-3查询组织/部门岗位明细列表-1-3-07批量查询岗位列表-主体生命周期不能为空", false);
            listStation = mStationService.batchQueryStationList(batchQueryStationListReq);


            listStation_1 = listStation;
        }

//步骤3: 1-3-08批量查询职位列表 - batchQueryPostList
        List<Post> listPost = new ArrayList<>();
        if (listStation != null && listStation.size() > 0) {
            BatchQueryPostListReq batchQueryPostListReq = new BatchQueryPostListReq();
            batchQueryPostListReq.setPostList(listStation.stream().map(item -> item.getPostId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48875_1
            batchQueryPostListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48876_1

            /*1-3-08批量查询职位列表[1467]   */
            Assert.isNull(batchQueryPostListReq.getSubjectLifeCycle(), "D1-3查询组织/部门岗位明细列表-1-3-08批量查询职位列表-主体生命周期不能为空", false);
            listPost = mPostService.batchQueryPostList(batchQueryPostListReq);


            listPost_1 = listPost;
        }

//步骤4: 1-3-04批量查询岗位类型 - batchQueryStationType
        List<StationType> listStationType = new ArrayList<>();
        if (listStation != null && listStation.size() > 0) {
            BatchQueryStationTypeReq batchQueryStationTypeReq = new BatchQueryStationTypeReq();
            batchQueryStationTypeReq.setOrgStationTypeList(listStation.stream().map(item -> item.getStationTypeId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48879_1

            /*1-3-04批量查询岗位类型[1651]   */

            listStationType = mStationTypeService.batchQueryStationType(batchQueryStationTypeReq);


            listStationType_1 = listStationType;
        }

        QueryDeptStationInfoListRespDto retData = new QueryDeptStationInfoListRespDto();
        //数据集融合  MoreListToOneSource
        if (listStation_1 != null && !CollectionUtil.isEmpty(listStation_1)) {
            for (Station station : listStation_1) {
                StationDto retElm = new StationDto();
                retElm.setStationId(station.getStationId());//SimpleFieldAssign//sourceId:24291_2
                retElm.setStationName(station.getStationName());//SimpleFieldAssign//sourceId:24293_2
                retElm.setStationDutyDesc(station.getStationDutyDesc());//SimpleFieldAssign//sourceId:24294_2
                retElm.setStationTargetDesc(station.getStationTargetDesc());//SimpleFieldAssign//sourceId:24296_2
                retElm.setPostId(station.getPostId());//SimpleFieldAssign//sourceId:24297_2
                retElm.setStationTypeId(station.getStationTypeId());//SimpleFieldAssign//sourceId:24298_2
                retData.getStationList().add(retElm);
                if (listPost_1 != null) {
                    for (Post post : listPost_1) {
                        if (post.getPostId().equals(station.getPostId())) {
                            retElm.setPostName(post.getPostName());//SimpleFieldAssign//sourceId:24295_2
                        }
                    }
                }

                if (listStationType_1 != null) {
                    for (StationType stationType : listStationType_1) {
                        if (stationType.getStationTypeId().equals(station.getStationTypeId())) {
                            retElm.setStationTypeName(stationType.getStationTypeName());//SimpleFieldAssign//sourceId:24292_2
                        }
                    }
                }

            }
        }//sourceId:48882_1


        return retData;
    }

    /**
     * D1-3查询部门下岗位列表[1472]
     * gen by moon at 10/2/2022, 12:06:57 AM
     */
    @Trace(operationName = "D1-3查询部门下岗位列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptStationListRespDto queryDeptStationList(QueryDeptStationListReqDto reqDto) {


        List<Station> listStation_1 = new ArrayList<>();
        List<Post> listPost_1 = new ArrayList<>();
//步骤0: 1-3-11查询组织部门职务列表 - queryOrgDeptPositionList
        List<DeptPositionRelationship> listDeptPositionRelationship = new ArrayList<>();
        QueryOrgDeptPositionListReq queryOrgDeptPositionListReq = new QueryOrgDeptPositionListReq();
        queryOrgDeptPositionListReq.setOrgTypeCode("DEPARTMENT");//sourceId:48925_1
        queryOrgDeptPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48929_1
        if (reqDto != null) {
            queryOrgDeptPositionListReq.setOrgEntityId(reqDto.getOrgEntityId());//SimpleFieldAssign//sourceId:48926_1
        }

        /*1-3-11查询组织部门职务列表[193]   */
        Assert.isNull(queryOrgDeptPositionListReq.getOrgTypeCode(), "D1-3查询部门下岗位列表-1-3-11查询组织部门职务列表-所属实例类型编码不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getOrgEntityId(), "D1-3查询部门下岗位列表-1-3-11查询组织部门职务列表-所属对象实例ID不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getSubjectLifeCycle(), "D1-3查询部门下岗位列表-1-3-11查询组织部门职务列表-主体生命周期不能为空", false);
        listDeptPositionRelationship = mDeptPositionRelationshipService.queryOrgDeptPositionList(queryOrgDeptPositionListReq);


//步骤1: 1-3-05批量查询职务列表 - batchQueryPositionList
        List<Position> listPosition = new ArrayList<>();
        if (listDeptPositionRelationship != null && listDeptPositionRelationship.size() > 0) {
            BatchQueryPositionListReq batchQueryPositionListReq = new BatchQueryPositionListReq();
            batchQueryPositionListReq.setPositionList(listDeptPositionRelationship.stream().map(item -> item.getPositionId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48940_1
            batchQueryPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48943_1

            /*1-3-05批量查询职务列表[1460]   */
            Assert.isNull(batchQueryPositionListReq.getSubjectLifeCycle(), "D1-3查询部门下岗位列表-1-3-05批量查询职务列表-主体生命周期不能为空", false);
            listPosition = mPositionService.batchQueryPositionList(batchQueryPositionListReq);


        }

//步骤2: 1-3-07批量查询岗位列表 - batchQueryStationList
        List<Station> listStation = new ArrayList<>();
        if (listPosition != null && listPosition.size() > 0) {
            BatchQueryStationListReq batchQueryStationListReq = new BatchQueryStationListReq();
            batchQueryStationListReq.setStationList(listPosition.stream().map(item -> item.getStationId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48945_1
            batchQueryStationListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48946_1

            /*1-3-07批量查询岗位列表[1466]   */
            Assert.isNull(batchQueryStationListReq.getSubjectLifeCycle(), "D1-3查询部门下岗位列表-1-3-07批量查询岗位列表-主体生命周期不能为空", false);
            listStation = mStationService.batchQueryStationList(batchQueryStationListReq);


            listStation_1 = listStation;
        }

//步骤3: 1-3-08批量查询职位列表 - batchQueryPostList
        List<Post> listPost = new ArrayList<>();
        if (listStation != null && listStation.size() > 0) {
            BatchQueryPostListReq batchQueryPostListReq = new BatchQueryPostListReq();
            batchQueryPostListReq.setPostList(listStation.stream().map(item -> item.getPostId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48949_1
            batchQueryPostListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48953_1

            /*1-3-08批量查询职位列表[1467]   */
            Assert.isNull(batchQueryPostListReq.getSubjectLifeCycle(), "D1-3查询部门下岗位列表-1-3-08批量查询职位列表-主体生命周期不能为空", false);
            listPost = mPostService.batchQueryPostList(batchQueryPostListReq);


            listPost_1 = listPost;
        }

        QueryDeptStationListRespDto retData = new QueryDeptStationListRespDto();
        //数据集融合  MoreListToOneSource
        if (listStation_1 != null && !CollectionUtil.isEmpty(listStation_1)) {
            for (Station station : listStation_1) {
                StationDto retElm = new StationDto();
                retElm.setStationId(station.getStationId());//SimpleFieldAssign//sourceId:24411_2
                retElm.setStationName(station.getStationName());//SimpleFieldAssign//sourceId:24412_2
                retElm.setPostId(station.getPostId());//SimpleFieldAssign//sourceId:24414_2
                retData.getStationList().add(retElm);
                if (listPost_1 != null) {
                    for (Post post : listPost_1) {
                        if (post.getPostId().equals(station.getPostId())) {
                            retElm.setPostName(post.getPostName());//SimpleFieldAssign//sourceId:24413_2
                        }
                    }
                }

            }
        }//sourceId:48954_1


        return retData;
    }

    /**
     * D1-3查询组织部门职务列表（边界）[1456]
     * gen by moon at 10/2/2022, 12:04:56 AM
     */
    @Trace(operationName = "D1-3查询组织部门职务列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOrgDeptPositionListBorderRespDto queryOrgDeptPositionListBorder(QueryOrgDeptPositionListBorderReqDto reqDto) {


        List<DeptPositionRelationship> listDeptPositionRelationship_1 = new ArrayList<>();
        List<Position> listPosition_1 = new ArrayList<>();
        List<PositionGrade> listPositionGrade_1 = new ArrayList<>();
//步骤0: 1-3-11查询组织部门职务列表 - queryOrgDeptPositionList
        List<DeptPositionRelationship> listDeptPositionRelationship = new ArrayList<>();
        QueryOrgDeptPositionListReq queryOrgDeptPositionListReq = new QueryOrgDeptPositionListReq();
        queryOrgDeptPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48786_1
        if (reqDto != null) {
            queryOrgDeptPositionListReq.setOrgTypeCode(reqDto.getOrgTypeCode());//SimpleFieldAssign//sourceId:35617_1
            queryOrgDeptPositionListReq.setOrgEntityId(reqDto.getOrgEntityId());//SimpleFieldAssign//sourceId:35618_1
        }

        /*1-3-11查询组织部门职务列表[193]   */
        Assert.isNull(queryOrgDeptPositionListReq.getOrgTypeCode(), "D1-3查询组织部门职务列表（边界）-1-3-11查询组织部门职务列表-所属实例类型编码不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getOrgEntityId(), "D1-3查询组织部门职务列表（边界）-1-3-11查询组织部门职务列表-所属对象实例ID不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getSubjectLifeCycle(), "D1-3查询组织部门职务列表（边界）-1-3-11查询组织部门职务列表-主体生命周期不能为空", false);
        listDeptPositionRelationship = mDeptPositionRelationshipService.queryOrgDeptPositionList(queryOrgDeptPositionListReq);


        listDeptPositionRelationship_1 = listDeptPositionRelationship;

//步骤1: 1-3-05批量查询职务列表 - batchQueryPositionList
        List<Position> listPosition = new ArrayList<>();
        if (listDeptPositionRelationship != null && listDeptPositionRelationship.size() > 0) {
            BatchQueryPositionListReq batchQueryPositionListReq = new BatchQueryPositionListReq();
            batchQueryPositionListReq.setPositionList(listDeptPositionRelationship.stream().map(item -> item.getPositionId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:35717_1
            batchQueryPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48787_1
            if (reqDto != null) {
                batchQueryPositionListReq.setPositionGradeId(reqDto.getPositionGradeId());//SimpleFieldAssign//sourceId:35966_1
            }

            /*1-3-05批量查询职务列表[1460]   */
            Assert.isNull(batchQueryPositionListReq.getSubjectLifeCycle(), "D1-3查询组织部门职务列表（边界）-1-3-05批量查询职务列表-主体生命周期不能为空", false);
            listPosition = mPositionService.batchQueryPositionList(batchQueryPositionListReq);


            listPosition_1 = listPosition;
        }

//步骤2: 1-3-03批量查询职务级别列表 - batchQueryPositionGradeList
        List<PositionGrade> listPositionGrade = new ArrayList<>();
        if (listPosition != null && listPosition.size() > 0) {
            BatchQueryPositionGradeListReq batchQueryPositionGradeListReq = new BatchQueryPositionGradeListReq();
            batchQueryPositionGradeListReq.setOrgPositionGradeList(listPosition.stream().map(item -> item.getPositionGradeId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:48782_1
            batchQueryPositionGradeListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:48783_1

            /*1-3-03批量查询职务级别列表[1482]   */
            Assert.isNull(batchQueryPositionGradeListReq.getSubjectLifeCycle(), "D1-3查询组织部门职务列表（边界）-1-3-03批量查询职务级别列表-主体生命周期不能为空", false);
            listPositionGrade = mPositionGradeService.batchQueryPositionGradeList(batchQueryPositionGradeListReq);


            listPositionGrade_1 = listPositionGrade;
        }

        QueryOrgDeptPositionListBorderRespDto retData = new QueryOrgDeptPositionListBorderRespDto();
        //数据集融合  MoreListToOneSource
        if (listPosition_1 != null && !CollectionUtil.isEmpty(listPosition_1)) {
            for (Position position : listPosition_1) {
                OrgDeptPositionDto retElm = new OrgDeptPositionDto();
                retElm.setPositionIdNameId(position.getPositionIdNameId());//SimpleFieldAssign//sourceId:35154_2
                retElm.setPositionIdName(position.getPositionIdName());//SimpleFieldAssign//sourceId:16344_2
                retElm.setPositionType(position.getPositionType());//SimpleFieldAssign//sourceId:16341_2
                retElm.setPositionGradeId(position.getPositionGradeId());//SimpleFieldAssign//sourceId:24071_2
                retData.getOrgDeptPositionList().add(retElm);
                if (listPositionGrade_1 != null) {
                    for (PositionGrade positionGrade : listPositionGrade_1) {
                        if (positionGrade.getPositionGradeId().equals(position.getPositionGradeId())) {
                            retElm.setPositionGradeName(positionGrade.getPositionGradeName());//SimpleFieldAssign//sourceId:24070_2
                        }
                    }
                }

            }
        }//sourceId:35755_1


        return retData;
    }


    /**
     * D1执行批次发布部门职务处理(公共)[3765]
     * gen by moon at 9/20/2023, 11:29:21 PM
     */
    @Trace(operationName = "D1执行批次发布部门职务处理(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementBatchFileDeptPositionHandleComRespDto implementBatchFileDeptPositionHandleCom(ImplementBatchFileDeptPositionHandleComReqDto reqDto) {


        //virtualUsage 1-3-13查最终部门就职记录职务列表  11596
        List<InductionRecord> listInductionRecord = new ArrayList<>();
        QueryInductionRecordListReq queryInductionRecordListReq = new QueryInductionRecordListReq();
        queryInductionRecordListReq.setInductionUnitTypeCode("DEPT");//sourceId:178521_1_11596
        queryInductionRecordListReq.setUpdateStatus("UNCHANGED");//sourceId:178524_1_11596
        queryInductionRecordListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:178525_1_11596
        if (reqDto != null) {
            queryInductionRecordListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:178522_1_11596
        }

        /*1-3-13查最终部门就职记录职务列表[166]   */
        Assert.isNull(queryInductionRecordListReq.getInductionUnitTypeCode(), "D1执行批次发布部门职务处理(公共)-1-3-13查最终部门就职记录职务列表-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListReq.getOrganizationId(), "D1执行批次发布部门职务处理(公共)-1-3-13查最终部门就职记录职务列表-组织ID不能为空", false);
        Assert.isNull(queryInductionRecordListReq.getUpdateStatus(), "D1执行批次发布部门职务处理(公共)-1-3-13查最终部门就职记录职务列表-批次下更新状态不能为空", false);
        Assert.isNull(queryInductionRecordListReq.getSpaceId(), "D1执行批次发布部门职务处理(公共)-1-3-13查最终部门就职记录职务列表-创建于空间ID不能为空", false);
        listInductionRecord = mInductionRecordService.queryInductionRecordList(queryInductionRecordListReq)/*vcase invoke 本地 method 方法调用;*/;


//virtualUsage 1-3-11查询当前部门职务关系列表  11600
        List<DeptPositionRelationship> listDeptPositionRelationship = new ArrayList<>();
        QueryOrgDeptPositionListReq queryOrgDeptPositionListReq = new QueryOrgDeptPositionListReq();
        queryOrgDeptPositionListReq.setOrgTypeCode("DEPARTMENT");//sourceId:178665_1_11600
        queryOrgDeptPositionListReq.setIsArchive("FALSE");//sourceId:178673_1_11600
        queryOrgDeptPositionListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:178670_1_11600
        if (reqDto != null) {
            queryOrgDeptPositionListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:178668_1_11600
        }

        /*1-3-11查询当前部门职务关系列表[193]   */
        Assert.isNull(queryOrgDeptPositionListReq.getOrganizationId(), "D1执行批次发布部门职务处理(公共)-1-3-11查询当前部门职务关系列表-组织ID不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getOrgTypeCode(), "D1执行批次发布部门职务处理(公共)-1-3-11查询当前部门职务关系列表-所属实例类型编码不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getIsArchive(), "D1执行批次发布部门职务处理(公共)-1-3-11查询当前部门职务关系列表-是否存档不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getSpaceId(), "D1执行批次发布部门职务处理(公共)-1-3-11查询当前部门职务关系列表-创建于空间ID不能为空", false);
        listDeptPositionRelationship = mDeptPositionRelationshipService.queryOrgDeptPositionList(queryOrgDeptPositionListReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((listInductionRecord != null && listInductionRecord != null && listInductionRecord.size() >= 0 || listDeptPositionRelationship != null && listDeptPositionRelationship != null && listDeptPositionRelationship.size() >= 0)) {
            //if((1-3-13查最终部门就职记录职务列表（用于新增）.就职记录列表数据集条数 大于等于 0 or 1-3-11查询当前部门职务关系列表（用于存档）.组织部门职务数据集条数 大于等于 0))  15404

//ModelCode: dataAucClassification
            ImplementClassDeptPositionAddFileRespDto dataAucClassificationRes = null;
            if (listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord) && listInductionRecord.size() > 0 && listDeptPositionRelationship != null && !CollectionUtil.isEmpty(listDeptPositionRelationship) && listDeptPositionRelationship.size() > 0) {
                ImplementClassDeptPositionAddFileReqDto dataAucClassificationReq = new ImplementClassDeptPositionAddFileReqDto();
                if (listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord) && listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord)) {
                    dataAucClassificationReq.setOrgInductionRecordList(listInductionRecord.stream().map(item -> BeanUtil.toBean(item, OrgInductionRecordDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:179053_1_15405
                }
                if (listDeptPositionRelationship != null && !CollectionUtil.isEmpty(listDeptPositionRelationship) && listDeptPositionRelationship != null && !CollectionUtil.isEmpty(listDeptPositionRelationship)) {
                    dataAucClassificationReq.setOrgDeptPositionList(listDeptPositionRelationship.stream().map(item -> BeanUtil.toBean(item, OrgDeptPositionDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:179054_1_15405
                }

                /*M1执行分类部门职务新增与存档（特殊方法）[3770]  入参两个数据集，出参三个数据集，分别对应：新增数据集、删除数据集、存档数据集 */

                dataAucClassificationRes = nbOrgPosition.implementClassDeptPositionAddFile(dataAucClassificationReq);


            }
            if ((dataAucClassificationRes != null && dataAucClassificationRes.getAddDeptPositionList() != null && dataAucClassificationRes.getAddDeptPositionList().size() > 0 && dataAucClassificationRes != null && dataAucClassificationRes.getFileDeptPosition() != null && dataAucClassificationRes.getFileDeptPosition().size() >= 0)) {
                //if((M1执行分类部门职务新增与存档（特殊方法）.新增部门职务数据集条数 大于 0 and M1执行分类部门职务新增与存档（特殊方法）.存档部门职务数据集条数 大于等于 0))  15406

                boolean bOOLEAN;
                List<DeptPositionRelationship> listDeptPositionRelationship_2 = new ArrayList<>();
                if (dataAucClassificationRes != null && dataAucClassificationRes.getAddDeptPositionList() != null && !CollectionUtil.isEmpty(dataAucClassificationRes.getAddDeptPositionList())) {
                    listDeptPositionRelationship_2 = //objList-to-objLists
                            dataAucClassificationRes.getAddDeptPositionList().stream().map(item -> {
                                DeptPositionRelationship elm = new DeptPositionRelationship();
                                elm.setOrgTypeCode("DEPARTMENT");//sourceId:76383_2_15408
                                elm.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:76386_2_15408
                                if (item != null) {
                                    elm.setPositionId(item.getPositionId());//SimpleFieldAssign//sourceId:76382_2_15408
                                    elm.setOrgEntityId(item.getEntityId());//SimpleFieldAssign//sourceId:76384_2_15408
                                }
                                if (reqDto != null) {
                                    elm.setOrganizationId(reqDto.getOrganizationId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:76385_2_15408
                                }
                                return elm;
                            }).collect(Collectors.toList());//objList-to-objLists//sourceId:178988_1_15408
                }

                /*1-3-11批量增组织部门职务[3769]   */

                bOOLEAN = mDeptPositionRelationshipService.batchAddOrgDeptPosition(listDeptPositionRelationship_2)/*vcase invoke 本地 method 方法调用;*/;


            } else if ((dataAucClassificationRes != null && dataAucClassificationRes.getFileDeptPosition() != null && dataAucClassificationRes.getFileDeptPosition().size() > 0 && dataAucClassificationRes != null && dataAucClassificationRes.getAddDeptPositionList() != null && dataAucClassificationRes.getAddDeptPositionList().size() >= 0)) {
                //elseif((M1执行分类部门职务新增与存档（特殊方法）.存档部门职务数据集条数 大于 0 and M1执行分类部门职务新增与存档（特殊方法）.新增部门职务数据集条数 大于等于 0))  15407

                QueryItemMatchResultToAnswerDetailComRespDto queryItemMatchResultToAnswerDetailComRespDto = null;
                QueryItemMatchResultToAnswerDetailComReqDto queryItemMatchResultToAnswerDetailComReqDto = new QueryItemMatchResultToAnswerDetailComReqDto();
                queryItemMatchResultToAnswerDetailComReqDto.setConfItemCode("ORG_STRUCTURE_MODEL");//CUSTOM_CONVENTION//sourceId:178550_1_15409
                queryItemMatchResultToAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:178551_1_15409
                queryItemMatchResultToAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:178552_1_15409
                queryItemMatchResultToAnswerDetailComReqDto.setIsInitialScheme("TRUE");//sourceId:308477_1_15409
                queryItemMatchResultToAnswerDetailComReqDto.setIsPlatData("FALSE");//sourceId:308478_1_15409

                /*D2-3查询组织架构模式配置项[3094]   */
                Assert.isNull(queryItemMatchResultToAnswerDetailComReqDto.getConfItemCode(), "D1执行批次发布部门职务处理(公共)-D2-3查询组织架构模式配置项-配置项标识不能为空", false);
                Assert.isNull(queryItemMatchResultToAnswerDetailComReqDto.getResultAspObjType(), "D1执行批次发布部门职务处理(公共)-D2-3查询组织架构模式配置项-开通对象类型编码不能为空", false);
                Assert.isNull(queryItemMatchResultToAnswerDetailComReqDto.getResultAspObjId(), "D1执行批次发布部门职务处理(公共)-D2-3查询组织架构模式配置项-开通对象ID不能为空", false);
                Assert.isNull(queryItemMatchResultToAnswerDetailComReqDto.getIsInitialScheme(), "D1执行批次发布部门职务处理(公共)-D2-3查询组织架构模式配置项-是否初始方案答案不能为空", false);
                Assert.isNull(queryItemMatchResultToAnswerDetailComReqDto.getIsPlatData(), "D1执行批次发布部门职务处理(公共)-D2-3查询组织架构模式配置项-是否标准答案不能为空", false);
                queryItemMatchResultToAnswerDetailComRespDto = confSchemeService.queryItemMatchResultToAnswerDetailCom(queryItemMatchResultToAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                if ((!(queryItemMatchResultToAnswerDetailComRespDto != null && queryItemMatchResultToAnswerDetailComRespDto.getOrgStructureModel() != null && queryItemMatchResultToAnswerDetailComRespDto.getOrgStructureModel().equals("PLAN_STAFFING")))) {
                    //if(D2-3查询组织架构模式配置项.空间组织架构模式 不等于 计划编制型)  15410

                    boolean bOOLEAN_1;
                    List<DeptPositionRelationship> listDeptPositionRelationship_3 = new ArrayList<>();
                    if (dataAucClassificationRes != null) {
                        //simpleList-to-objLists
                        for (String item : dataAucClassificationRes.getFileDeptPosition()) {
                            DeptPositionRelationship oneItem = new DeptPositionRelationship();
                            oneItem.setSubjectLifeCycle("ARCHIVING");//sourceId:76388_2_15411
                            oneItem.setIsArchive("TRUE");//sourceId:76389_2_15411
                            if (dataAucClassificationRes != null) {
                                oneItem.setOrgPositionRelationshipId(item);//SimpleFieldAssign//sourceId:76387_2_15411
                            }

                            listDeptPositionRelationship_3.add(oneItem);
                        }//sourceId:178989_1_15411
                    }

                    /*1-3-11批量修改组织部门职务[1667]   */

                    bOOLEAN_1 = mDeptPositionRelationshipService.batchUpdateOrgDeptPosition(listDeptPositionRelationship_3)/*vcase invoke 本地 method 方法调用;*/;


                    ImplementPowerUpdateStatusComRespDto implementPowerUpdateStatusComRespDto = null;
                    ImplementPowerUpdateStatusComReqDto implementPowerUpdateStatusComReqDto = new ImplementPowerUpdateStatusComReqDto();
                    implementPowerUpdateStatusComReqDto.setTypeCode("DEPARTMENT_POSITION");//sourceId:178542_1_15412
                    if (dataAucClassificationRes != null) {
                        implementPowerUpdateStatusComReqDto.setTributPowerList(dataAucClassificationRes.getFileDeptPosition());//list-field-assign//sourceId:178541_1_15412
                    }

                    /*D1-2执行权限更新状态(公共)[3762]   */
                    Assert.isNull(implementPowerUpdateStatusComReqDto.getTypeCode(), "D1执行批次发布部门职务处理(公共)-D1-2执行权限更新状态(公共)-分配对象类型编码不能为空", false);
                    implementPowerUpdateStatusComRespDto = powerService.implementPowerUpdateStatusCom(implementPowerUpdateStatusComReqDto)/*vcase invoke isSameApp*/;


//processBranchName:正常结束 ,processBranchId:15415

                } else {
                    //else  15413

//processBranchName:正常结束 ,processBranchId:15414

                }
            }
        }
        ImplementBatchFileDeptPositionHandleComRespDto retData = new ImplementBatchFileDeptPositionHandleComRespDto();


        return retData;
    }

    /**
     * D1-3查询职务归属组织列表[1498]
     * gen by moon at 10/2/2022, 12:09:15 AM
     */
    @Trace(operationName = "D1-3查询职务归属组织列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryPositionOrgListRespDto queryPositionOrgList(QueryPositionOrgListReqDto reqDto) {


        CheckRemovalObjsRespDto collectionRemoveDuplicateDataRes_1 = null;
        List<Organization> listOrganization_1 = new ArrayList<>();
        List<InductionRecord> listInductionRecord_1 = new ArrayList<>();
        List<Userinfo> listUserinfo_1 = new ArrayList<>();
//步骤0: 1-3-11查询组织部门职务列表 - queryOrgDeptPositionList
        List<DeptPositionRelationship> listDeptPositionRelationship = new ArrayList<>();
        QueryOrgDeptPositionListReq queryOrgDeptPositionListReq = new QueryOrgDeptPositionListReq();
        queryOrgDeptPositionListReq.setOrgTypeCode("ORGANIZATION");//sourceId:40060_1
        queryOrgDeptPositionListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:49548_1
        if (reqDto != null) {
            queryOrgDeptPositionListReq.setPositionId(reqDto.getPositionId());//SimpleFieldAssign//sourceId:40047_1
        }

        /*1-3-11查询组织部门职务列表[193]   */
        Assert.isNull(queryOrgDeptPositionListReq.getPositionId(), "D1-3查询职务归属组织列表-1-3-11查询组织部门职务列表-职务ID不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getOrgTypeCode(), "D1-3查询职务归属组织列表-1-3-11查询组织部门职务列表-所属实例类型编码不能为空", false);
        Assert.isNull(queryOrgDeptPositionListReq.getSpaceId(), "D1-3查询职务归属组织列表-1-3-11查询组织部门职务列表-创建于空间ID不能为空", false);
        listDeptPositionRelationship = mDeptPositionRelationshipService.queryOrgDeptPositionList(queryOrgDeptPositionListReq);


//步骤1: M-去重职务所属对象（特殊方法） - checkRemovalObjs
        //ModelCode: collectionRemoveDuplicateData
        CheckRemovalObjsRespDto collectionRemoveDuplicateDataRes = null;
        if (listDeptPositionRelationship != null && listDeptPositionRelationship.size() > 0) {
            CheckRemovalObjsReqDto collectionRemoveDuplicateDataReq = new CheckRemovalObjsReqDto();
            collectionRemoveDuplicateDataReq.setOrgDeptPositionList(listDeptPositionRelationship.stream().map(item -> {
                OrgDeptPositionDto elm = BeanUtil.toBean(item, OrgDeptPositionDto.class);
                //elm.setOrgEntityId();//DUPLICATE_ID  TODO ruizhe dong

                return elm;
            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:63332_1

            /*M-去重职务所属对象（特殊方法）[2174]  入参一个数据集，通过去重标识，去除数据集中重复的数据 */

            collectionRemoveDuplicateDataRes = nbOrgPosition.checkRemovalObjs(collectionRemoveDuplicateDataReq);


            collectionRemoveDuplicateDataRes_1 = collectionRemoveDuplicateDataRes;
        }

//步骤2: 1-3-12批量查询组织列表 - batchQueryOrg
        List<Organization> listOrganization = new ArrayList<>();
        BatchQueryOrgReq batchQueryOrgReq = new BatchQueryOrgReq();
        if (collectionRemoveDuplicateDataRes != null) {
            batchQueryOrgReq.setOrgList(collectionRemoveDuplicateDataRes.getOrgDeptPositionList().stream().map(item -> item.getOrgEntityId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:40097_1
        }

        /*1-3-12批量查询组织列表[1346]   */

        listOrganization = mOrganizationService.batchQueryOrg(batchQueryOrgReq);


        listOrganization_1 = listOrganization;

//步骤3: 1-3-13批量查询就职记录列表 - batchQueryInductionRecordList
        List<InductionRecord> listInductionRecord = new ArrayList<>();
        if (listDeptPositionRelationship != null && listDeptPositionRelationship.size() > 0) {
            BatchQueryInductionRecordListReq batchQueryInductionRecordListReq = new BatchQueryInductionRecordListReq();
            batchQueryInductionRecordListReq.setPerOrgInductionRecordList(listDeptPositionRelationship.stream().map(item -> item.getOperationInductionId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:40105_1

            /*1-3-13批量查询就职记录列表[601]   */

            listInductionRecord = mInductionRecordService.batchQueryInductionRecordList(batchQueryInductionRecordListReq);


            listInductionRecord_1 = listInductionRecord;
        }

//步骤4: 1-2-02批量查询个人资料列表 - batchQueryUserinfoList
        List<Userinfo> listUserinfo = new ArrayList<>();
        if (listInductionRecord != null && listInductionRecord.size() > 0) {
            BatchQueryUserinfoListReq batchQueryUserinfoListReq = new BatchQueryUserinfoListReq();
            batchQueryUserinfoListReq.setUserList(listInductionRecord.stream().map(item -> item.getUserId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:40107_1

            /*1-2-02批量查询个人资料列表[52]   */

            listUserinfo = mUserinfoService.batchQueryUserinfoList(batchQueryUserinfoListReq);


            listUserinfo_1 = listUserinfo;
        }

        QueryPositionOrgListRespDto retData = new QueryPositionOrgListRespDto();
        //数据集融合  MoreListToOneSource
        if (collectionRemoveDuplicateDataRes_1 != null && !CollectionUtil.isEmpty(collectionRemoveDuplicateDataRes_1.getOrgDeptPositionList())) {
            for (OrgDeptPositionDto orgDeptPositionDto : collectionRemoveDuplicateDataRes_1.getOrgDeptPositionList()) {
                OrgDeptPositionDto retElm = new OrgDeptPositionDto();
                if (collectionRemoveDuplicateDataRes_1 != null) {
                    retElm.setOrgEntityId(orgDeptPositionDto.getOrgEntityId());//SimpleFieldAssign//sourceId:35413_2
                    retElm.setOperationInductionId(orgDeptPositionDto.getOperationInductionId());//SimpleFieldAssign//sourceId:35414_2
                    retElm.setOperateTime(orgDeptPositionDto.getOperateTime());//SimpleFieldAssign//sourceId:35415_2
                }
                retData.getOrgDeptPositionList().add(retElm);
                if (listOrganization_1 != null) {
                    for (Organization organization : listOrganization_1) {
                        if (organization.getOrganizationId().equals(orgDeptPositionDto.getOrgEntityId())) {
                            retElm.setOrganizationName(organization.getOrganizationName());//SimpleFieldAssign//sourceId:35416_2
                            retElm.setOrganizationNumber(organization.getOrganizationNumber());//SimpleFieldAssign//sourceId:35418_2
                        }
                    }
                }

            }
        }//sourceId:63334_1


        return retData;
    }
    //
}
